<!doctype html>

<html>
<head>
  <link rel="shortcut icon" href="static/images/favicon.ico" type="image/x-icon">
  <title>linkbubble_test.js (Closure Library API Documentation - JavaScript)</title>
  <link rel="stylesheet" href="static/css/base.css">
  <link rel="stylesheet" href="static/css/doc.css">
  <link rel="stylesheet" href="static/css/sidetree.css">
  <link rel="stylesheet" href="static/css/prettify.css">

  <script>
     var _staticFilePath = "static/";
     var _typeTreeName = "goog";
     var _fileTreeName = "Source";
  </script>

  <script src="static/js/doc.js">
  </script>


  <meta charset="utf8">
</head>

<body onload="grokdoc.onLoad();">

<div id="header">
  <div class="g-section g-tpl-50-50 g-split">
    <div class="g-unit g-first">
      <a id="logo" href="index.html">Closure Library API Documentation</a>
    </div>

    <div class="g-unit">
      <div class="g-c">
        <strong>Go to class or file:</strong>
        <input type="text" id="ac">
      </div>
    </div>
  </div>
</div>

<div class="clear"></div>

<h2><a href="local_closure_goog_editor_plugins_linkbubble_test.js.html">linkbubble_test.js</a></h2>

<pre class="prettyprint lang-js">
<a name="line1"></a>// Copyright 2008 The Closure Library Authors. All Rights Reserved.
<a name="line2"></a>//
<a name="line3"></a>// Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
<a name="line4"></a>// you may not use this file except in compliance with the License.
<a name="line5"></a>// You may obtain a copy of the License at
<a name="line6"></a>//
<a name="line7"></a>//      http://www.apache.org/licenses/LICENSE-2.0
<a name="line8"></a>//
<a name="line9"></a>// Unless required by applicable law or agreed to in writing, software
<a name="line10"></a>// distributed under the License is distributed on an &quot;AS-IS&quot; BASIS,
<a name="line11"></a>// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
<a name="line12"></a>// See the License for the specific language governing permissions and
<a name="line13"></a>// limitations under the License.
<a name="line14"></a>
<a name="line15"></a>goog.provide(&#39;goog.editor.plugins.LinkBubbleTest&#39;);
<a name="line16"></a>goog.setTestOnly(&#39;goog.editor.plugins.LinkBubbleTest&#39;);
<a name="line17"></a>
<a name="line18"></a>goog.require(&#39;goog.dom&#39;);
<a name="line19"></a>goog.require(&#39;goog.dom.Range&#39;);
<a name="line20"></a>goog.require(&#39;goog.dom.TagName&#39;);
<a name="line21"></a>goog.require(&#39;goog.editor.Command&#39;);
<a name="line22"></a>goog.require(&#39;goog.editor.Link&#39;);
<a name="line23"></a>goog.require(&#39;goog.editor.plugins.LinkBubble&#39;);
<a name="line24"></a>goog.require(&#39;goog.events.BrowserEvent&#39;);
<a name="line25"></a>goog.require(&#39;goog.events.Event&#39;);
<a name="line26"></a>goog.require(&#39;goog.events.EventType&#39;);
<a name="line27"></a>goog.require(&#39;goog.string&#39;);
<a name="line28"></a>goog.require(&#39;goog.style&#39;);
<a name="line29"></a>goog.require(&#39;goog.testing.FunctionMock&#39;);
<a name="line30"></a>goog.require(&#39;goog.testing.PropertyReplacer&#39;);
<a name="line31"></a>goog.require(&#39;goog.testing.editor.FieldMock&#39;);
<a name="line32"></a>goog.require(&#39;goog.testing.editor.TestHelper&#39;);
<a name="line33"></a>goog.require(&#39;goog.testing.events&#39;);
<a name="line34"></a>goog.require(&#39;goog.testing.jsunit&#39;);
<a name="line35"></a>goog.require(&#39;goog.userAgent&#39;);
<a name="line36"></a>
<a name="line37"></a>var fieldDiv;
<a name="line38"></a>var FIELDMOCK;
<a name="line39"></a>var linkBubble;
<a name="line40"></a>var link;
<a name="line41"></a>var mockWindowOpen;
<a name="line42"></a>var stubs;
<a name="line43"></a>var testHelper;
<a name="line44"></a>
<a name="line45"></a>function setUpPage() {
<a name="line46"></a>  fieldDiv = goog.dom.$(&#39;field&#39;);
<a name="line47"></a>  stubs = new goog.testing.PropertyReplacer();
<a name="line48"></a>  testHelper = new goog.testing.editor.TestHelper(goog.dom.getElement(&#39;field&#39;));
<a name="line49"></a>}
<a name="line50"></a>
<a name="line51"></a>function setUp() {
<a name="line52"></a>  testHelper.setUpEditableElement();
<a name="line53"></a>  FIELDMOCK = new goog.testing.editor.FieldMock();
<a name="line54"></a>
<a name="line55"></a>  linkBubble = new goog.editor.plugins.LinkBubble();
<a name="line56"></a>  linkBubble.fieldObject = FIELDMOCK;
<a name="line57"></a>
<a name="line58"></a>  link = fieldDiv.firstChild;
<a name="line59"></a>
<a name="line60"></a>  mockWindowOpen = new goog.testing.FunctionMock(&#39;open&#39;);
<a name="line61"></a>  stubs.set(window, &#39;open&#39;, mockWindowOpen);
<a name="line62"></a>}
<a name="line63"></a>
<a name="line64"></a>function tearDown() {
<a name="line65"></a>  linkBubble.closeBubble();
<a name="line66"></a>  testHelper.tearDownEditableElement();
<a name="line67"></a>  stubs.reset();
<a name="line68"></a>}
<a name="line69"></a>
<a name="line70"></a>function testLinkSelected() {
<a name="line71"></a>  FIELDMOCK.$replay();
<a name="line72"></a>  linkBubble.enable(FIELDMOCK);
<a name="line73"></a>  goog.dom.Range.createFromNodeContents(link).select();
<a name="line74"></a>  linkBubble.handleSelectionChange();
<a name="line75"></a>  assertBubble();
<a name="line76"></a>  FIELDMOCK.$verify();
<a name="line77"></a>}
<a name="line78"></a>
<a name="line79"></a>function testLinkClicked() {
<a name="line80"></a>  FIELDMOCK.$replay();
<a name="line81"></a>  linkBubble.enable(FIELDMOCK);
<a name="line82"></a>  linkBubble.handleSelectionChange(createMouseEvent(link));
<a name="line83"></a>  assertBubble();
<a name="line84"></a>  FIELDMOCK.$verify();
<a name="line85"></a>}
<a name="line86"></a>
<a name="line87"></a>function testImageLink() {
<a name="line88"></a>  FIELDMOCK.$replay();
<a name="line89"></a>  linkBubble.enable(FIELDMOCK);
<a name="line90"></a>  link.setAttribute(&#39;imageanchor&#39;, 1);
<a name="line91"></a>  linkBubble.handleSelectionChange(createMouseEvent(link));
<a name="line92"></a>  assertBubble();
<a name="line93"></a>  FIELDMOCK.$verify();
<a name="line94"></a>}
<a name="line95"></a>
<a name="line96"></a>function closeBox() {
<a name="line97"></a>  var closeBox = goog.dom.getElementsByTagNameAndClass(goog.dom.TagName.DIV,
<a name="line98"></a>      &#39;tr_bubble_closebox&#39;);
<a name="line99"></a>  assertEquals(&#39;Should find only one close box&#39;, 1, closeBox.length);
<a name="line100"></a>  assertNotNull(&#39;Found close box&#39;, closeBox[0]);
<a name="line101"></a>  goog.testing.events.fireClickSequence(closeBox[0]);
<a name="line102"></a>}
<a name="line103"></a>
<a name="line104"></a>function testCloseBox() {
<a name="line105"></a>  testLinkClicked();
<a name="line106"></a>  closeBox();
<a name="line107"></a>  assertNoBubble();
<a name="line108"></a>  FIELDMOCK.$verify();
<a name="line109"></a>}
<a name="line110"></a>
<a name="line111"></a>function testChangeClicked() {
<a name="line112"></a>  FIELDMOCK.execCommand(goog.editor.Command.MODAL_LINK_EDITOR,
<a name="line113"></a>      new goog.editor.Link(link, false));
<a name="line114"></a>  FIELDMOCK.$registerArgumentListVerifier(&#39;execCommand&#39;, function(arr1, arr2) {
<a name="line115"></a>    return arr1.length == arr2.length &amp;&amp;
<a name="line116"></a>           arr1.length == 2 &amp;&amp;
<a name="line117"></a>           arr1[0] == goog.editor.Command.MODAL_LINK_EDITOR &amp;&amp;
<a name="line118"></a>           arr2[0] == goog.editor.Command.MODAL_LINK_EDITOR &amp;&amp;
<a name="line119"></a>           arr1[1] instanceof goog.editor.Link &amp;&amp;
<a name="line120"></a>           arr2[1] instanceof goog.editor.Link;
<a name="line121"></a>  });
<a name="line122"></a>  FIELDMOCK.$times(1);
<a name="line123"></a>  FIELDMOCK.$returns(true);
<a name="line124"></a>  FIELDMOCK.$replay();
<a name="line125"></a>  linkBubble.enable(FIELDMOCK);
<a name="line126"></a>
<a name="line127"></a>  linkBubble.handleSelectionChange(createMouseEvent(link));
<a name="line128"></a>  assertBubble();
<a name="line129"></a>
<a name="line130"></a>  goog.testing.events.fireClickSequence(
<a name="line131"></a>      goog.dom.$(goog.editor.plugins.LinkBubble.CHANGE_LINK_ID_));
<a name="line132"></a>  assertNoBubble();
<a name="line133"></a>  FIELDMOCK.$verify();
<a name="line134"></a>}
<a name="line135"></a>
<a name="line136"></a>function testDeleteClicked() {
<a name="line137"></a>  FIELDMOCK.dispatchBeforeChange();
<a name="line138"></a>  FIELDMOCK.$times(1);
<a name="line139"></a>  FIELDMOCK.dispatchChange();
<a name="line140"></a>  FIELDMOCK.$times(1);
<a name="line141"></a>  FIELDMOCK.focus();
<a name="line142"></a>  FIELDMOCK.$times(1);
<a name="line143"></a>  FIELDMOCK.$replay();
<a name="line144"></a>
<a name="line145"></a>  linkBubble.enable(FIELDMOCK);
<a name="line146"></a>
<a name="line147"></a>  linkBubble.handleSelectionChange(createMouseEvent(link));
<a name="line148"></a>  assertBubble();
<a name="line149"></a>
<a name="line150"></a>  goog.testing.events.fireClickSequence(
<a name="line151"></a>      goog.dom.$(goog.editor.plugins.LinkBubble.DELETE_LINK_ID_));
<a name="line152"></a>  var element = goog.userAgent.GECKO ? document.body : fieldDiv;
<a name="line153"></a>  assertNotEquals(&#39;Link removed&#39;, element.firstChild.nodeName,
<a name="line154"></a>      goog.dom.TagName.A);
<a name="line155"></a>  assertNoBubble();
<a name="line156"></a>  FIELDMOCK.$verify();
<a name="line157"></a>}
<a name="line158"></a>
<a name="line159"></a>function testActionClicked() {
<a name="line160"></a>  var SPAN = &#39;actionSpanId&#39;;
<a name="line161"></a>  var LINK = &#39;actionLinkId&#39;;
<a name="line162"></a>  var toShowCount = 0;
<a name="line163"></a>  var actionCount = 0;
<a name="line164"></a>
<a name="line165"></a>  var linkAction = new goog.editor.plugins.LinkBubble.Action(
<a name="line166"></a>      SPAN, LINK, &#39;message&#39;,
<a name="line167"></a>      function() {
<a name="line168"></a>        toShowCount++;
<a name="line169"></a>        return toShowCount == 1; // Show it the first time.
<a name="line170"></a>      },
<a name="line171"></a>      function() {
<a name="line172"></a>        actionCount++;
<a name="line173"></a>      });
<a name="line174"></a>
<a name="line175"></a>  linkBubble = new goog.editor.plugins.LinkBubble(linkAction);
<a name="line176"></a>  linkBubble.fieldObject = FIELDMOCK;
<a name="line177"></a>  FIELDMOCK.$replay();
<a name="line178"></a>  linkBubble.enable(FIELDMOCK);
<a name="line179"></a>
<a name="line180"></a>  // The first time the bubble is shown, show our custom action.
<a name="line181"></a>  linkBubble.handleSelectionChange(createMouseEvent(link));
<a name="line182"></a>  assertBubble();
<a name="line183"></a>  assertEquals(&#39;Should check showing the action&#39;, 1, toShowCount);
<a name="line184"></a>  assertEquals(&#39;Action should not have fired yet&#39;, 0, actionCount);
<a name="line185"></a>
<a name="line186"></a>  assertTrue(&#39;Action should be visible 1st time&#39;, goog.style.isElementShown(
<a name="line187"></a>      goog.dom.$(SPAN)));
<a name="line188"></a>  goog.testing.events.fireClickSequence(goog.dom.$(LINK));
<a name="line189"></a>
<a name="line190"></a>  assertEquals(&#39;Should not check showing again yet&#39;, 1, toShowCount);
<a name="line191"></a>  assertEquals(&#39;Action should be fired&#39;, 1, actionCount);
<a name="line192"></a>
<a name="line193"></a>  closeBox();
<a name="line194"></a>  assertNoBubble();
<a name="line195"></a>
<a name="line196"></a>  // The action won&#39;t be shown the second time around.
<a name="line197"></a>  linkBubble.handleSelectionChange(createMouseEvent(link));
<a name="line198"></a>  assertBubble();
<a name="line199"></a>  assertEquals(&#39;Should check showing again&#39;, 2, toShowCount);
<a name="line200"></a>  assertEquals(&#39;Action should not fire again&#39;, 1, actionCount);
<a name="line201"></a>  assertFalse(&#39;Action should not be shown 2nd time&#39;, goog.style.isElementShown(
<a name="line202"></a>      goog.dom.$(SPAN)));
<a name="line203"></a>
<a name="line204"></a>  FIELDMOCK.$verify();
<a name="line205"></a>}
<a name="line206"></a>
<a name="line207"></a>function testLinkTextClicked() {
<a name="line208"></a>  mockWindowOpen(&#39;http://www.google.com/&#39;, &#39;_blank&#39;, &#39;&#39;);
<a name="line209"></a>  mockWindowOpen.$replay();
<a name="line210"></a>  FIELDMOCK.$replay();
<a name="line211"></a>  linkBubble.enable(FIELDMOCK);
<a name="line212"></a>
<a name="line213"></a>  linkBubble.handleSelectionChange(createMouseEvent(link));
<a name="line214"></a>  assertBubble();
<a name="line215"></a>
<a name="line216"></a>  goog.testing.events.fireClickSequence(
<a name="line217"></a>      goog.dom.$(goog.editor.plugins.LinkBubble.TEST_LINK_ID_));
<a name="line218"></a>
<a name="line219"></a>  assertBubble();
<a name="line220"></a>  mockWindowOpen.$verify();
<a name="line221"></a>  FIELDMOCK.$verify();
<a name="line222"></a>}
<a name="line223"></a>
<a name="line224"></a>function testLinkTextClickedCustomUrlFn() {
<a name="line225"></a>  mockWindowOpen(&#39;http://images.google.com/&#39;, &#39;_blank&#39;, &#39;&#39;);
<a name="line226"></a>  mockWindowOpen.$replay();
<a name="line227"></a>  FIELDMOCK.$replay();
<a name="line228"></a>  linkBubble.enable(FIELDMOCK);
<a name="line229"></a>
<a name="line230"></a>  linkBubble.setTestLinkUrlFn(function(url) {
<a name="line231"></a>    return url.replace(&#39;www&#39;, &#39;images&#39;);
<a name="line232"></a>  });
<a name="line233"></a>
<a name="line234"></a>  linkBubble.handleSelectionChange(createMouseEvent(link));
<a name="line235"></a>  assertBubble();
<a name="line236"></a>
<a name="line237"></a>  goog.testing.events.fireClickSequence(
<a name="line238"></a>      goog.dom.$(goog.editor.plugins.LinkBubble.TEST_LINK_ID_));
<a name="line239"></a>
<a name="line240"></a>  assertBubble();
<a name="line241"></a>  mockWindowOpen.$verify();
<a name="line242"></a>  FIELDMOCK.$verify();
<a name="line243"></a>}
<a name="line244"></a>
<a name="line245"></a>
<a name="line246"></a>/**
<a name="line247"></a> * Urls with invalid schemes shouldn&#39;t be linkified.
<a name="line248"></a> * @bug 2585360
<a name="line249"></a> */
<a name="line250"></a>function testDontLinkifyInvalidScheme() {
<a name="line251"></a>  mockWindowOpen.$replay();
<a name="line252"></a>  FIELDMOCK.$replay();
<a name="line253"></a>  linkBubble.enable(FIELDMOCK);
<a name="line254"></a>
<a name="line255"></a>  var badLink = document.createElement(&#39;a&#39;);
<a name="line256"></a>  badLink.href = &#39;javascript:alert(1)&#39;;
<a name="line257"></a>  badLink.innerHTML = &#39;bad link&#39;;
<a name="line258"></a>
<a name="line259"></a>  linkBubble.handleSelectionChange(createMouseEvent(badLink));
<a name="line260"></a>  assertBubble();
<a name="line261"></a>
<a name="line262"></a>  // The link shouldn&#39;t exist at all
<a name="line263"></a>  assertNull(goog.dom.$(goog.editor.plugins.LinkBubble.TEST_LINK_ID_));
<a name="line264"></a>
<a name="line265"></a>  assertBubble();
<a name="line266"></a>  mockWindowOpen.$verify();
<a name="line267"></a>  FIELDMOCK.$verify();
<a name="line268"></a>}
<a name="line269"></a>
<a name="line270"></a>function testIsSafeSchemeToOpen() {
<a name="line271"></a>  // Urls with no scheme at all are ok too since &#39;http://&#39; will be prepended.
<a name="line272"></a>  var good = [
<a name="line273"></a>    &#39;http://google.com&#39;, &#39;http://google.com/&#39;, &#39;https://google.com&#39;,
<a name="line274"></a>    &#39;null@google.com&#39;, &#39;http://www.google.com&#39;, &#39;http://site.com&#39;,
<a name="line275"></a>    &#39;google.com&#39;, &#39;google&#39;, &#39;http://google&#39;, &#39;HTTP://GOOGLE.COM&#39;,
<a name="line276"></a>    &#39;HtTp://www.google.com&#39;
<a name="line277"></a>  ];
<a name="line278"></a>
<a name="line279"></a>  var bad = [
<a name="line280"></a>    &#39;javascript:google.com&#39;, &#39;httpp://google.com&#39;, &#39;data:foo&#39;,
<a name="line281"></a>    &#39;javascript:alert(\&#39;hi\&#39;);&#39;, &#39;abc:def&#39;
<a name="line282"></a>  ];
<a name="line283"></a>
<a name="line284"></a>  for (var i = 0; i &lt; good.length; i++) {
<a name="line285"></a>    assertTrue(good[i] + &#39; should have a safe scheme&#39;,
<a name="line286"></a>        linkBubble.isSafeSchemeToOpen_(good[i]));
<a name="line287"></a>  }
<a name="line288"></a>
<a name="line289"></a>  for (i = 0; i &lt; bad.length; i++) {
<a name="line290"></a>    assertFalse(bad[i] + &#39; should have an unsafe scheme&#39;,
<a name="line291"></a>        linkBubble.isSafeSchemeToOpen_(bad[i]));
<a name="line292"></a>  }
<a name="line293"></a>}
<a name="line294"></a>
<a name="line295"></a>function testShouldOpenWithWhitelist() {
<a name="line296"></a>  linkBubble.setSafeToOpenSchemes([&#39;abc&#39;]);
<a name="line297"></a>
<a name="line298"></a>  assertTrue(&#39;Scheme should be safe&#39;,
<a name="line299"></a>      linkBubble.shouldOpenUrl(&#39;abc://google.com&#39;));
<a name="line300"></a>  assertFalse(&#39;Scheme should be unsafe&#39;,
<a name="line301"></a>              linkBubble.shouldOpenUrl(&#39;http://google.com&#39;));
<a name="line302"></a>
<a name="line303"></a>  linkBubble.setBlockOpeningUnsafeSchemes(false);
<a name="line304"></a>  assertTrue(&#39;Non-whitelisted should now be safe after disabling blocking&#39;,
<a name="line305"></a>      linkBubble.shouldOpenUrl(&#39;http://google.com&#39;));
<a name="line306"></a>}
<a name="line307"></a>
<a name="line308"></a>
<a name="line309"></a>/**
<a name="line310"></a> * @bug 763211
<a name="line311"></a> * @bug 2182147
<a name="line312"></a> */
<a name="line313"></a>function testLongUrlTestLinkAnchorTextCorrect() {
<a name="line314"></a>  FIELDMOCK.$replay();
<a name="line315"></a>  linkBubble.enable(FIELDMOCK);
<a name="line316"></a>
<a name="line317"></a>  var longUrl = &#39;http://www.reallylonglinkthatshouldbetruncated&#39; +
<a name="line318"></a>      &#39;becauseitistoolong.com&#39;;
<a name="line319"></a>  var truncatedLongUrl = goog.string.truncateMiddle(longUrl, 48);
<a name="line320"></a>
<a name="line321"></a>  var longLink = document.createElement(&#39;a&#39;);
<a name="line322"></a>  longLink.href = longUrl;
<a name="line323"></a>  longLink.innerHTML = &#39;Google&#39;;
<a name="line324"></a>  fieldDiv.appendChild(longLink);
<a name="line325"></a>
<a name="line326"></a>  linkBubble.handleSelectionChange(createMouseEvent(longLink));
<a name="line327"></a>  assertBubble();
<a name="line328"></a>
<a name="line329"></a>  var testLinkEl = goog.dom.$(goog.editor.plugins.LinkBubble.TEST_LINK_ID_);
<a name="line330"></a>  assertEquals(
<a name="line331"></a>      &#39;The test link\&#39;s anchor text should be the truncated URL.&#39;,
<a name="line332"></a>      truncatedLongUrl,
<a name="line333"></a>      testLinkEl.innerHTML);
<a name="line334"></a>
<a name="line335"></a>  fieldDiv.removeChild(longLink);
<a name="line336"></a>  FIELDMOCK.$verify();
<a name="line337"></a>}
<a name="line338"></a>
<a name="line339"></a>
<a name="line340"></a>/**
<a name="line341"></a> * @bug 2416024
<a name="line342"></a> */
<a name="line343"></a>function testOverridingCreateBubbleContentsDoesntNpeGetTargetUrl() {
<a name="line344"></a>  FIELDMOCK.$replay();
<a name="line345"></a>  linkBubble.enable(FIELDMOCK);
<a name="line346"></a>
<a name="line347"></a>  stubs.set(linkBubble, &#39;createBubbleContents&#39;,
<a name="line348"></a>      function(elem) {
<a name="line349"></a>        // getTargetUrl would cause an NPE if urlUtil_ wasn&#39;t defined yet.
<a name="line350"></a>        linkBubble.getTargetUrl();
<a name="line351"></a>      });
<a name="line352"></a>  assertNotThrows(&#39;Accessing this.urlUtil_ should not NPE&#39;,
<a name="line353"></a>                  goog.bind(linkBubble.handleSelectionChange,
<a name="line354"></a>                            linkBubble, createMouseEvent(link)));
<a name="line355"></a>
<a name="line356"></a>  FIELDMOCK.$verify();
<a name="line357"></a>}
<a name="line358"></a>
<a name="line359"></a>function assertBubble() {
<a name="line360"></a>  assertTrue(&#39;Link bubble visible&#39;, linkBubble.isVisible());
<a name="line361"></a>  assertNotNull(&#39;Link bubble created&#39;,
<a name="line362"></a>      goog.dom.$(goog.editor.plugins.LinkBubble.LINK_DIV_ID_));
<a name="line363"></a>}
<a name="line364"></a>
<a name="line365"></a>function assertNoBubble() {
<a name="line366"></a>  assertFalse(&#39;Link bubble not visible&#39;, linkBubble.isVisible());
<a name="line367"></a>  assertNull(&#39;Link bubble not created&#39;,
<a name="line368"></a>      goog.dom.$(goog.editor.plugins.LinkBubble.LINK_DIV_ID_));
<a name="line369"></a>}
<a name="line370"></a>
<a name="line371"></a>function createMouseEvent(target) {
<a name="line372"></a>  var eventObj = new goog.events.Event(goog.events.EventType.MOUSEUP, target);
<a name="line373"></a>  eventObj.button = goog.events.BrowserEvent.MouseButton.LEFT;
<a name="line374"></a>
<a name="line375"></a>  return new goog.events.BrowserEvent(eventObj, target);
<a name="line376"></a>}
</pre>


</body>
</html>
